package com.hopetech.activemqdemo.publish_subscribe;

import com.hopetech.activemqdemo.producer_consumer.Producer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

@RunWith(SpringRunner.class)
@SpringBootTest
public class AppTest {
    @Resource
    private Publisher publisher;

    @Test
    public void test(){
        for(int i = 0; i <10; i ++){
            publisher.publish("test.topic", "Topic Msg: " + i);
        }
    }
}
